
// index.js
const imgs = document.getElementsByClassName('txt');
const img = imgs[0];
let isShow = true;

document.addEventListener('keydown', (e) => {
  if (e.code === 'Space') {
    img.className = `txt txt-${isShow ? 'hide' : 'show'}`;
    isShow = !isShow;
  }
});



